<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据可视化-中国地理图</title>
    <style>
         #main {
            width : 1000px;
            height: 600px;
            margin : 50px auto;
        }
    </style>
</head>
<body>
 <div id="main"></div>
</body>
<script src="../static/js/echarts.js"></script>
<script src="../static/js/china.js"></script>
<script>
var mapChart = echarts.init(document.getElementById('main'))
    var mapOption = {
            title: {
                text: '{{title|safe}}',
                subtext: "{{subTitle|safe}}",
                textStyle: {
                    color: 'red' ,
                    fontSize: 16 ,
                    fontWeight: 'bolder',
                },
                subtextStyle: {
                fontSize: 20,
                color:'blue'
                },
                left: '40%'
            },
            tooltip: {
                trigger: 'item',
            },
            visualMap: {
                min: 0,
                max: {{mapMax|safe}},
                left: 'left',
                top: 'bottom',
                text: ['高','低'],
                inRange: {
                    color:  ['#00FF00', '#FFFF00', '#FF0000']
                },
                show:true
            },
            geo: {
                map: 'china',
                roam: false,
                zoom:1.23,
                label: {
                    normal: {
                        show: true,
                        fontSize:'10',
                        color: 'rgba(0,0,0,0.7)'
                    }
                },
                itemStyle: {
                    normal:{
                        borderColor: 'rgba(0, 0, 0, 0.2)'
                    },
                    emphasis:{
                        areaColor: '#F3B329',
                        shadowOffsetX: 0,
                        shadowOffsetY: 0,
                        shadowBlur: 20,
                        borderWidth: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            },
            series : [
                {
                    name: '{{mapDw|safe}}',
                    type: 'map',
                    geoIndex: 0,
                    data:{{data|safe}}
                }
            ]
        };
    mapChart.setOption(mapOption);
   </script>
</html>